<template>
    <div>
       <el-form  label-position="left"   label-width="80px" :inline="true"  class="demo-form-inline">
         <el-form-item label="订单编号">
            <el-input style="width:500px" :value="params.orderList.order.orderid"  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="价格">
            <el-input style="width:500px" :value="params.orderList.order.price"  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="租客">
            <el-input style="width:500px" :value="params.orderList.renter.uname"  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="出租方">
            <el-input style="width:500px" :value="params.orderList.lessor.uname"  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="车位位置">
            <el-input style="width:500px" :value="params.orderList.parkingInformation.parkingAddress"  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="车辆">
            <el-input style="width:500px" :value="params.orderList.car.plateNumber"  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="开始时间">
            <el-input style="width:500px" :value="params.orderList.order.creatTime | dateFormat"  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="结束时间">
            <el-input style="width:500px" :value="params.orderList.order.endTime | dateFormat"  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="订单状态">
            <el-input style="width:500px" :value="params.orderList.order.status | formatter"   readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="评价内容">
            <el-input style="width:500px" :value="params.orderList.complain.describe "  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="评价类型">
            <el-input style="width:500px" :value="params.orderList.complain.state | formatter2"  readonly="readonly" ></el-input>
         </el-form-item>
         <el-form-item label="投诉">
            <el-input style="width:500px" :value="params.orderList.complain.reason"  readonly="readonly" ></el-input>
         </el-form-item>

      </el-form>
        
    </div>
    
</template>



<script>
export default {
    name:"detail",
    props:['params'], 
    data(){
        return{

        }
    },
    mounted(){
        console.log(this.params.orderList)
    },
    methods:{
      
      
    },
    filters:{
      dateFormat(dataStr){
        var dt = new Date(dataStr)
        var y = dt.getFullYear()
        var m = dt.getMonth()
        if(m<10){
           m="0"+m
        }
        var d = dt.getDate()
        if(d<10){
           d="0"+d
        }
        var hh = dt.getHours()
        var mm = dt.getMinutes()
        var ss = dt.getSeconds()
        if(hh<10){
           hh="0"+hh
        }
        if(mm<10){
           mm="0"+mm
        }
        if(ss<10){
           ss = "0"+ss
        }
        return y+"-"+m+"-"+d+"  "+hh+":"+mm+":"+ss
      },
      formatter(str){
        if(str == 0){
          return "未付款"
        }else if(str == 1){
          return "已付款"
        }else if(str == 2){
          return "异常"
        }
      },
    },
    formatter2(str){
        if(str == 0){
          return "好评"
        }else if(str == 1){
          return "中评"
        }else if(str == 2){
          return "差评"
        }
      },
    
   
}
</script>


<style scoped>

</style>






